package MemberService

import (
	"context"
	"gdshop-back-end-go/client-api/app/request/MemberReq"
	toolsDb "gdshop-back-end-go/common/db"
	"gdshop-back-end-go/common/response"
	"github.com/gogf/gf/frame/g"
	"time"
)

func ClaerMySearchs(ctx context.Context, parames *MemberReq.ClaerMySearchs) *response.JsonResponse {
	_, err := toolsDb.GetUnSafaTableAddDeleteWhere(ctx, "member_search").Where("member_id",
		parames.MemberId).Update(g.Map{
		"delete_at": time.Now().Unix(),
	})
	if err != nil {
		return response.FailByRequestMessage(nil, err.Error())
	}

	return response.SuccessByRequestMessage(nil, "成功")
}
